package com.guigu.www.controller;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.guigu.www.pojo.Dept;
import com.guigu.www.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tj
 * @since 2021-03-17
 */
@Controller
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptService deptService;
    @GetMapping("queryAll")
    public List<Dept> queryAll(){
        List<Dept> depts = deptService.selectList(new EntityWrapper<Dept>());
        return depts;
    }
}

